home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / Witch Doctor 1.5.1 / Witch Doctor Tester / Witch Doctor Source / Witch Doctor.c next >
Encoding:
Text File  |  1995-12-02  |  15.6 KB  |  158 lines  |  [TEXT/CWIE]

  1. ext, &textLength, &textSize);
  2.         }
  3.     stringIndex++;
  4.  
  5.         // Need at least Sound Manager 3.0
  6.     if (queryFlags & kRunningSoundManager3) {
  7.         long result;
  8.         result = SndSoundManagerVersion();
  9.         if ((*(NumVersion*)&result).majorRev < 3) {
  10.             *resultFlags |= kRunningSoundManager3;
  11.             requireDialog = true;
  12.  
  13.             if (quitFlags & kRunningSoundManager3) {
  14.                 stringID = kWitchDoctorProblemStringID;
  15.                 forceQuit = true;
  16.             }
  17.             else
  18.                 stringID = kWitchDoctorWarningStringID;
  19.  
  20.             GetIndString(message, stringID, stringIndex);
  21.             AddMessage(message, text, &textLength, &textSize);
  22.         }
  23.     }
  24.     stringIndex++;
  25.  
  26.         // Is Apple sound chip present? 68K Macs only.
  27.     if (queryFlags & kHasASCSoundChip) {
  28.         Gestalt(gestaltHardwareAttr, &gestaltInfo);
  29.         if (!BitTst(&gestaltInfo, 31-gestaltHasASC)) {
  30.             *resultFlags |= kHasASCSoundChip;
  31.             requireDialog = true;
  32.  
  33.             if (quitFlags & kHasASCSoundChip) {
  34.                 stringID = kWitchDoctorProblemStringID;
  35.                 forceQuit = true;
  36.             }
  37.             else
  38.                 stringID = kWitchDoctorWarningStringID;
  39.  
  40.             GetIndString(message, stringID, stringIndex);
  41.             AddMessage(message, text, &textLength, &textSize);
  42.         }
  43.     }
  44.     stringIndex++;
  45.  
  46.         // Do we have stereo output capability?
  47.     if (queryFlags & kHasStereoOutput) {
  48.         Gestalt(gestaltSoundAttr, &gestaltInfo);
  49.         if (!BitTst(&gestaltInfo, 31-gestaltStereoCapability)) {
  50.             *resultFlags |= kHasStereoOutput;
  51.             requireDialog = true;
  52.  
  53.             if (quitFlags & kHasStereoOutput) {
  54.                 stringID = kWitchDoctorProblemStringID;
  55.                 forceQuit = true;
  56.             }
  57.             else
  58.                 stringID = kWitchDoctorWarningStringID;
  59.  
  60.             GetIndString(message, stringID, stringIndex);
  61.             AddMessage(message, text, &textLength, &textSize);
  62.         }
  63.     }
  64.     stringIndex++;
  65.  
  66.         // Is Color QuickDraw present?
  67.     if (queryFlags & kHasColorQuickDraw) {
  68.         Gestalt(gestaltQuickdrawVersion, &gestaltInfo);
  69.         if (gestaltInfo < gestalt8BitQD) {
  70.             *resultFlags |= kHasColorQuickDraw;
  71.             requireDialog = true;
  72.  
  73.             if (quitFlags & kHasColorQuickDraw) {
  74.                 stringID = kWitchDoctorProblemStringID;
  75.                 forceQuit = true;
  76.             }
  77.             else
  78.                 stringID = kWitchDoctorWarningStringID;
  79.  
  80.             GetIndString(message, stringID, stringIndex);
  81.             AddMessage(message, text, &textLength, &textSize);
  82.         }
  83.     }
  84.     stringIndex++;
  85.  
  86.         // Is an FPU present?
  87.     if (queryFlags & kHasFPU) {
  88.         Gestalt(gestaltFPUType, &gestaltInfo);
  89.         if (gestaltInfo == gestaltNoFPU) {
  90.             *resultFlags |= kHasFPU;
  91.             requireDialog = true;
  92.  
  93.             if (quitFlags & kHasFPU) {
  94.                 stringID = kWitchDoctorProblemStringID;
  95.                 forceQuit = true;
  96.             }
  97.             else
  98.                 stringID = kWitchDoctorWarningStringID;
  99.  
  100.             GetIndString(message, stringID, stringIndex);
  101.             AddMessage(message, text, &textLength, &textSize);
  102.         }
  103.     }
  104.     stringIndex++;
  105.  
  106.         // Are we running on at least a 68020 processor? (emulated is ok)
  107.     if (queryFlags & kRunningAtLeast68020) {
  108.         Gestalt(gestaltProcessorType, &gestaltInfo);
  109.         if (gestaltInfo < gestalt68020) {
  110.             *resultFlags |= kRunningAtLeast68020;
  111.             requireDialog = true;
  112.  
  113.             if (quitFlags & kRunningAtLeast68020) {
  114.                 stringID = kWitchDoctorProblemStringID;
  115.                 forceQuit = true;
  116.             }
  117.             else
  118.                 stringID = kWitchDoctorWarningStringID;
  119.  
  120.             GetIndString(message, stringID, stringIndex);
  121.             AddMessage(message, text, &textLength, &textSize);
  122.         }
  123.     }
  124.     stringIndex++;
  125.  
  126.         // Are we running on a PowerPC?
  127.     if (queryFlags & kRunningPowerPC) {
  128.         Gestalt(gestaltSysArchitecture, &gestaltInfo);
  129.         if (gestaltInfo == gestalt68k) {
  130.             *resultFlags |= kRunningPowerPC;
  131.             requireDialog = true;
  132.  
  133.             if (quitFlags & kRunningPowerPC) {
  134.                 stringID = kWitchDoctorProblemStringID;
  135.                 forceQuit = true;
  136.             }
  137.             else
  138.                 stringID = kWitchDoctorWarningStringID;
  139.  
  140.             GetIndString(message, stringID, stringIndex);
  141.             AddMessage(message, text, &textLength, &textSize);
  142.         }
  143.     }
  144.     stringIndex++;
  145.  
  146.         // Is temporary memory support present?
  147.     if (queryFlags & kHasTemporaryMemory) {
  148.         Gestalt(gestaltOSAttr, &gestaltInfo);
  149.         if (!BitTst(&gestaltInfo, 31-gestaltTempMemSupport)) {
  150.             *resultFlags |= kHasTemporaryMemory;
  151.             requireDialog = true;
  152.  
  153.             if (quitFlags & kHasTemporaryMemory) {
  154.                 stringID = kWitchDoctorProblemStringID;
  155.                 forceQuit = true;
  156.             }
  157.             else
  158.                 stringID = kWitchDoc